<?php namespace Admin\Controller; 

use Admin\Model\Admin;

/**
 * 修改个人资料
 * @author 向军 <2300071698@qq.com>
 */
class MyController extends AuthController{
	//模型
	protected $db;
	//构造函数
	public function __init()
	{
		$this->db = new Admin;
	}

	//修改密码
	public function password(){
		if(IS_POST)
		{
			if($this->db->changePassword())
			{
				$this->success('操作成功');
			}
			else
			{
				$this->error($this->db->getError());
			}
		}
		else
		{
			View::make();
		}
	}

}













